home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3c / frexp.z / frexp
Encoding:
Text File  |  2002-10-03  |  17.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ffffrrrreeeexxxxpppp((((3333CCCC))))                                                            ffffrrrreeeexxxxpppp((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ffff_rrrr_eeee_xxxx_pppp, _llll_dddd_eeee_xxxx_pppp, _llll_oooo_gggg_bbbb, _iiii_llll_oooo_gggg_bbbb, _mmmm_oooo_dddd_ffff, _mmmm_oooo_dddd_ffff_ffff, _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr, _ssss_cccc_aaaa_llll_bbbb, _ffff_rrrr_eeee_xxxx_pppp_llll, _llll_dddd_eeee_xxxx_pppp_llll,
  10.      _llll_oooo_gggg_bbbb_llll, _mmmm_oooo_dddd_ffff_llll, _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll, _ssss_cccc_aaaa_llll_bbbb_llll, _nnnn_eeee_aaaa_rrrr_bbbb_yyyy_iiii_nnnn_tttt, _nnnn_eeee_aaaa_rrrr_bbbb_yyyy_iiii_nnnn_tttt_ffff, _nnnn_eeee_aaaa_rrrr_bbbb_yyyy_iiii_nnnn_tttt_llll,
  11.      _nnnn_eeee_xxxx_tttt_tttt_oooo_wwww_aaaa_rrrr_dddd, _nnnn_eeee_xxxx_tttt_tttt_oooo_wwww_aaaa_rrrr_dddd_ffff, _nnnn_eeee_xxxx_tttt_tttt_oooo_wwww_aaaa_rrrr_dddd_llll - manipulate parts of floating-point
  12.      numbers (libc routines)
  13.  
  14. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_mmmm_aaaa_tttt_hhhh_...._hhhh_>>>>
  16.  
  17.      _dddd_oooo_uuuu_bbbb_llll_eeee _ffff_rrrr_eeee_xxxx_pppp _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _****_eeee_pppp_tttt_rrrr_))))_;;;;
  18.  
  19.      _dddd_oooo_uuuu_bbbb_llll_eeee _llll_dddd_eeee_xxxx_pppp _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _eeee_xxxx_pppp_))))_;;;;
  20.  
  21.      _dddd_oooo_uuuu_bbbb_llll_eeee _llll_oooo_gggg_bbbb _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_))))_;;;;
  22.  
  23.      _iiii_nnnn_tttt _iiii_llll_oooo_gggg_bbbb _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_))))_;;;;
  24.  
  25.      _dddd_oooo_uuuu_bbbb_llll_eeee _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_1111_,,,, _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_2222_))))_;;;;
  26.  
  27.      _dddd_oooo_uuuu_bbbb_llll_eeee _ssss_cccc_aaaa_llll_bbbb _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _dddd_oooo_uuuu_bbbb_llll_eeee _eeee_xxxx_pppp_))))_;;;;
  28.  
  29.      _dddd_oooo_uuuu_bbbb_llll_eeee _mmmm_oooo_dddd_ffff _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _dddd_oooo_uuuu_bbbb_llll_eeee _****_iiii_pppp_tttt_rrrr_))))_;;;;
  30.  
  31.      _ffff_llll_oooo_aaaa_tttt _mmmm_oooo_dddd_ffff_ffff _((((_ffff_llll_oooo_aaaa_tttt _vvvv_aaaa_llll_uuuu_eeee_,,,, _ffff_llll_oooo_aaaa_tttt _****_iiii_pppp_tttt_rrrr_))))_;;;;
  32.  
  33.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _ffff_rrrr_eeee_xxxx_pppp_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _****_eeee_pppp_tttt_rrrr_))))_;;;;
  34.  
  35.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _llll_dddd_eeee_xxxx_pppp_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _eeee_xxxx_pppp_))))_;;;;
  36.  
  37.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _llll_oooo_gggg_bbbb_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_))))_;;;;
  38.  
  39.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_1111_,,,, _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_2222_))))_;;;;
  40.  
  41.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _ssss_cccc_aaaa_llll_bbbb_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _eeee_xxxx_pppp_))))_;;;;
  42.  
  43.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _mmmm_oooo_dddd_ffff_llll _((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _****_iiii_pppp_tttt_rrrr_))))_;;;;
  44.  
  45.      _dddd_oooo_uuuu_bbbb_llll_eeee _nnnn_eeee_aaaa_rrrr_bbbb_yyyy_iiii_nnnn_tttt_((((_dddd_oooo_uuuu_bbbb_llll_eeee _xxxx_))))_;;;;
  46.  
  47.      _ffff_llll_oooo_aaaa_tttt _nnnn_eeee_aaaa_rrrr_bbbb_yyyy_iiii_nnnn_tttt_ffff_((((_ffff_llll_oooo_aaaa_tttt _xxxx_))))_;;;;
  48.  
  49.      _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _nnnn_eeee_aaaa_rrrr_bbbb_yyyy_iiii_nnnn_tttt_llll_((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _xxxx_))))_;;;;
  50.  
  51.      _dddd_oooo_uuuu_bbbb_llll_eeee _nnnn_eeee_xxxx_tttt_tttt_oooo_wwww_aaaa_rrrr_dddd_((((_dddd_oooo_uuuu_bbbb_llll_eeee _xxxx_,,,, _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _yyyy_))))_;;;;
  52.  
  53.      float nexttowardf(float x, long double y);
  54.      _dddd_oooo_uuuu_bbbb_llll_eeee _nnnn_eeee_xxxx_tttt_tttt_oooo_wwww_aaaa_rrrr_dddd_llll_((((_llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _xxxx_,,,, _llll_oooo_nnnn_gggg _dddd_oooo_uuuu_bbbb_llll_eeee _yyyy_))))_;;;;
  55.  
  56. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  57.      (Note that the long double routines are only valid for the MIPSpro
  58.      compilers.)  Long double functions have been renamed to be compliant with
  59.      the ANSI-C standard, however to be backward compatible, they may still be
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffrrrreeeexxxxpppp((((3333CCCC))))                                                            ffffrrrreeeexxxxpppp((((3333CCCC))))
  71.  
  72.  
  73.  
  74.      called with the double precision function name prefixed with a q.
  75.  
  76.      Every non-zero number can be written uniquely as _x*2**_n, where the
  77.      mantissa (fraction) _xxxx is in the range 0.5 _< |_x| < 1.0, and the exponent _n
  78.      is an integer.  _ffff_rrrr_eeee_xxxx_pppp returns the mantissa of a double value, and stores
  79.      the exponent indirectly in the location pointed to by _eeee_pppp_tttt_rrrr.  If _v_a_l_u_e is
  80.      zero, both results returned by _ffff_rrrr_eeee_xxxx_pppp are zero.
  81.  
  82.      _ffff_rrrr_eeee_xxxx_pppp_llll returns the mantissa of a long double _v_a_l_u_e, and stores the
  83.      exponent indirectly in the location pointed to by _eeee_pppp_tttt_rrrr.  If _v_a_l_u_e is
  84.      zero, both results returned by _ffff_rrrr_eeee_xxxx_pppp_llll are zero.
  85.  
  86.      _llll_dddd_eeee_xxxx_pppp and _ssss_cccc_aaaa_llll_bbbb return the quantity _v_a_l_u_e*2**_e_x_p.  The only difference
  87.      between the two is that _ssss_cccc_aaaa_llll_bbbb of a signaling NaN will result in the
  88.      invalid operation exception being raised.  Users should note that routine
  89.      scalb in libm43 with prototype
  90.  
  91.      _dddd_oooo_uuuu_bbbb_llll_eeee _ssss_cccc_aaaa_llll_bbbb _((((_dddd_oooo_uuuu_bbbb_llll_eeee _vvvv_aaaa_llll_uuuu_eeee_,,,, _iiii_nnnn_tttt _eeee_xxxx_pppp_))))
  92.  
  93.      conflicts with the above definition of _ssss_cccc_aaaa_llll_bbbb.  If it is necessary to call
  94.      the libc version of scalb in this situation, the strong name _scalb
  95.      should be used.
  96.  
  97.      _llll_dddd_eeee_xxxx_pppp_llll and _ssss_cccc_aaaa_llll_bbbb_llll return the quantity _v_a_l_u_e*2**_e_x_p.  The only difference
  98.      between the two is that _ssss_cccc_aaaa_llll_bbbb_llll of a signaling NaN will result in the
  99.      invalid operation exception being raised.
  100.  
  101.      _llll_oooo_gggg_bbbb returns the unbiased exponent of its floating-point argument as a
  102.      double-precision floating-point value.
  103.  
  104.      _iiii_llll_oooo_gggg_bbbb returns the unbiased exponent of its floating-point argument as an
  105.      integer value.  The call _iiii_llll_oooo_gggg_bbbb_((((_xxxx_)))) is equivalent to _((((_iiii_nnnn_tttt_))))_llll_oooo_gggg_bbbb_((((_xxxx_)))).
  106.  
  107.      _llll_oooo_gggg_bbbb_llll returns the unbiased exponent of its floating-point argument as a
  108.      long double-precision floating-point value.
  109.  
  110.      _mmmm_oooo_dddd_ffff, _mmmm_oooo_dddd_ffff_ffff (single-precision version) and _mmmm_oooo_dddd_ffff_llll (long double-precision
  111.      version) return the signed fractional part of _v_a_l_u_e and store the
  112.      integral part indirectly in the location pointed to by _i_p_t_r.
  113.  
  114.      _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr returns the next representable double-precision floating-point
  115.      value following _v_a_l_u_e_1 in the direction of _v_a_l_u_e_2.  Thus, if _v_a_l_u_e_2 is
  116.      less than _v_a_l_u_e_1, _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr returns the largest representable floating-
  117.      point number less than _v_a_l_u_e_1.
  118.  
  119.      _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll returns the next representable long double-precision
  120.      floating-point value following _v_a_l_u_e_1 in the direction of _v_a_l_u_e_2.
  121.  
  122. NNNNOOOOTTTTEEEESSSS
  123.      If a C99 program that uses _cccc_llll_oooo_gggg is linked with a C++ program that
  124.      includes the _iiii_oooo_ssss_tttt_rrrr_eeee_aaaa_mmmm_...._hhhh header (the old _iiii_oooo_ssss_tttt_rrrr_eeee_aaaa_mmmm library), that program
  125.      cannot use the stream called _cccc_llll_oooo_gggg.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffrrrreeeexxxxpppp((((3333CCCC))))                                                            ffffrrrreeeexxxxpppp((((3333CCCC))))
  137.  
  138.  
  139.  
  140.      Long double operations on this system are only supported in round to
  141.      nearest rounding mode (the default).  The system must be in round to
  142.      nearest rounding mode when calling any of the long double functions, or
  143.      incorrect answers will result.
  144.  
  145.      Users concerned with portability to other computer systems should note
  146.      that the long double and float versions of these functions were optional
  147.      according to the ANSI C Programming Language Specification ISO/IEC 9899 :
  148.      1990 (E) and are no longer optional according to ISO/IEC 9899:1999(E).
  149.  
  150. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  151.      _cccc_cccc(1), _iiii_nnnn_tttt_rrrr_oooo(3M).
  152.  
  153. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  154.      If _llll_dddd_eeee_xxxx_pppp or _llll_dddd_eeee_xxxx_pppp_llll would cause overflow, _++++_____HHHH_UUUU_GGGG_EEEE______VVVV_AAAA_LLLL (defined in _mmmm_aaaa_tttt_hhhh_...._hhhh) is
  155.      returned (according to the sign of _v_a_l_u_e), and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.
  156.      If _llll_dddd_eeee_xxxx_pppp or _llll_dddd_eeee_xxxx_pppp_llll would cause underflow, zero is returned and _eeee_rrrr_rrrr_nnnn_oooo is
  157.      set to _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.  If the input _v_a_l_u_e to _llll_dddd_eeee_xxxx_pppp or _llll_dddd_eeee_xxxx_pppp_llll is NaN, the default
  158.      quiet NaN is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_DDDD_OOOO_MMMM.  If the input _v_a_l_u_e to
  159.      _llll_dddd_eeee_xxxx_pppp or _llll_dddd_eeee_xxxx_pppp_llll is Infinity, Infinity is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to
  160.      _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.  The same error conditions apply to _ssss_cccc_aaaa_llll_bbbb and _ssss_cccc_aaaa_llll_bbbb_llll except that
  161.      a signaling NaN as input will result in the raising of the invalid
  162.      operation exception.
  163.  
  164.      _llll_oooo_gggg_bbbb and _llll_oooo_gggg_bbbb_llll of NaN returns that NaN, _llll_oooo_gggg_bbbb and _llll_oooo_gggg_bbbb_llll of infinity return
  165.      positive infinity, and _llll_oooo_gggg_bbbb and _llll_oooo_gggg_bbbb_llll of zero return negative infinity
  166.      and result in the raising of the divide by zero exception.  In each of
  167.      these conditions _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_DDDD_OOOO_MMMM.
  168.  
  169.      _iiii_llll_oooo_gggg_bbbb of NaN or zero returns _I_N_T__M_I_N, _iiii_llll_oooo_gggg_bbbb of +infinity or -infinity
  170.      returns _I_N_T__M_A_X.  In each of these conditions _eeee_rrrr_rrrr_nnnn_oooo is _n_o_t set.
  171.  
  172.      If input _v_a_l_u_e_1 to _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr or _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll is positive or negative
  173.      infinity, that input is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_DDDD_OOOO_MMMM.  The overflow
  174.      and inexact exceptions are signalled when input _v_a_l_u_e_1 is finite, but
  175.      _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_((((_v_a_l_u_e_1_,,,, _v_a_l_u_e_2_)))) or _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll_((((_v_a_l_u_e_1_,,,, _v_a_l_u_e_2_)))) is not. The
  176.      underflow and inexact exceptions are signalled when _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_((((_v_a_l_u_e_1_,,,,
  177.      _v_a_l_u_e_2_)))) lies strictly between +_2**-1022 or _nnnn_eeee_xxxx_tttt_aaaa_ffff_tttt_eeee_rrrr_llll_((((_v_a_l_u_e_1_,,,, _v_a_l_u_e_2_))))
  178.      lies strictly between +_2**-916.  In these cases _eeee_rrrr_rrrr_nnnn_oooo is also set to
  179.      _EEEE_RRRR_AAAA_NNNN_GGGG_EEEE.
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.